package com.jcl.traffic.system.domain;

import lombok.Data;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

/**
 * @author jcl_hqu
 * @date 2020/12/26 16:52
 */

@Data
@Entity
@Table(name = "motor_break_rule")
public class BreakRule {
    @Id
    Long id;
    Long motor_id;
    Long security_hat;
    Date time;
    String location;
    String picture_url;

    @OneToMany(mappedBy = "breakRule",cascade = {CascadeType.ALL},fetch = FetchType.LAZY,orphanRemoval = true)
    private List<Motor> motors;
}
